class AccountMailer < ActionMailer::Base
  

  def welcome(user)
    subject    'Welcome to Grutalk'
    recipients user.email
    from       'lizhen@pub.xaonline.com'
    sent_on    Time.now
    
#    body       :greeting => 'Hi, Welcome to GruTalk'
     body       :user=>user       

  end

  def resetpassword(user,hash)
    subject    'Reset Your Password'
    recipients user.email
    from       'lizhen@pub.xaonline.com'
    sent_on    Time.now
    
    body       :user=>user,:hash=>hash
  end
  
  def verify(name,email,code,sent)
    subject 'Verify Your Email: '+email
    recipients email
    from 'lizhen@pub.xaonline.com'
    sent_on Time.now
    
    body  :name=>name,:email=>email,:code=>code,:valid_through=>(sent+259200)
  end

end
